package com.zmx.user.entity;

import com.zmx.common.common.entitys.BaseEntity;
import lombok.Data;
import javax.persistence.*;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.hibernate.annotations.Where;

/**
 * @author zhaomxr
 * null
 */
@Data
@Entity
@Table(name = "member")
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper=true)
@Inheritance(strategy = InheritanceType.JOINED)
@Where(clause = "is_vaild = 1")
public class Member extends BaseEntity {

	/**
	 * 姓名
	 */
	@Column(name = "name")
	private String name;

	/**
	 * 昵称
	 */
	@Column(name = "nick_name")
	private String nickName;

	/**
	 * 头像
	 */
	@Column(name = "avatar_url")
	private String avatarUrl;

	/**
	 * wx openid
	 */
	@Column(name = "openid")
	private String openid;

	/**
	 * 电话
	 */
	@Column(name = "phone")
	private String phone;

	/**
	 * 用户等级
	 */
	@Column(name = "member_rank")
	private Integer memberRank;

	/**
	 * 积分
	 */
	@Column(name = "point")
	private Integer point;

	/**
	 * 0-未知，1-男，2-女
	 */
	@Column(name = "gender")
	private Integer gender;

	/**
	 * 省
	 */
	@Column(name = "province")
	private String province;

	/**
	 * 市
	 */
	@Column(name = "city")
	private String city;

	/**
	 * 区/县
	 */
	@Column(name = "country")
	private String country;

	/**
	 * 年消费
	 */
	@Column(name = "year_amount")
	private Double yearAmount;

	/**
	 * 是否有效
	 */
	@Column(name = "is_vaild")
	private Integer isVaild;

	/**
	 * 备注
	 */
	@Column(name = "remark")
	private String remark;


}
